package com.api.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.api.dao.ResponseParamsMapper;
import com.api.entity.ResponseParams;
import com.api.service.ResponseParamsService;

@Service
public class ResponseParamsServiceImpl implements ResponseParamsService{

	@Autowired
	private ResponseParamsMapper responseParamsMapper;

	@Override
	public void add(ResponseParams responseParams) {
		responseParams.preInsert();
		this.responseParamsMapper.insert(responseParams);
	}

	@Override
	public ResponseParams getResponseParams(ResponseParams responseParams) {
		return this.responseParamsMapper.get(responseParams);
	}

	@Override
	public ResponseParams getResponseParams(String id) {
		return this.responseParamsMapper.selectByPrimaryKey(id);
	}


	@Override
	public List<ResponseParams> getResponseParamsList(String id) {
		return this.responseParamsMapper.getResponseParamsList(id);
	}

	@Override
	public int delete(String api_Id) {
		return this.responseParamsMapper.deleteByPrimaryKey(api_Id);
	}
}
